<template>
	<view class="content" :style="{
		minHeight:$height()+'px'
	}">
		<u-navbar title='我的' title-color='white' :is-back="false" :immersive="true" :background="{
			background: 'none'
		}" :border-bottom="false" />
		<view class="top">
			<view class="top1">
				<view class="top_1">
					<image :src="info.avatar" />
					<view class="top_1_1">
						<text>{{info.nickname}}</text>
						<text>{{info.mobile}}</text>
					</view>
				</view>
				<view class="top_2" @click="to('personal-information')">
					编辑资料>
				</view>
			</view>
			<view class="top3">
				<view class="top3_1">
					<text>200</text>
					<text>今日剩余拨打店铺(次)</text>
				</view>
				<view class="top3_1">
					<text>200</text>
					<text>今日剩余拨打租户(次)</text>
				</view>
				<view class="top3_1">
					<text>200</text>
					<text>已为您匹配店铺数量</text>
				</view>
			</view>
			<view class="top4" @click="to2('/pages/my/member/member')">
				<image src="http://puputong.huijipin.cn/uploads/20220322/8360625a5ce81e8ad57cccb236bcd3bd.png"
					class="top4_1" />
				<text class="top4_2">升级VIP享受更多超值权益</text>
				<view class="top4_3">
					<text>开通会员</text>
					<image src="http://puputong.huijipin.cn/uploads/20220322/312511688d42ac9fd8eca64f143d208a.png" />
				</view>
			</view>
		</view>
		<view class="carp">
			<view class="carp_1" @click="to2('/pages/my/release/release')">
				<view class="carp_1_1">
					<image src="http://puputong.huijipin.cn/uploads/20220322/12f9e89990d3bdf5fccf4ad8e62d6dc0.png" />
					<text>我的发布</text>
				</view>
				<image class="img"
					src="http://puputong.huijipin.cn/uploads/20220322/c3bd15684882187e0e83706cd88b873c.png" mode="">
				</image>
			</view>
			<view class="carp_1" @click="to2('/pages/my/drafts/drafts')">
				<view class="carp_1_1">
					<image src="http://puputong.huijipin.cn/uploads/20220322/73fbec3b4d526d166548f59cf88351e2.png" />
					<text>草稿箱</text>
				</view>
				<image class="img"
					src="http://puputong.huijipin.cn/uploads/20220322/c3bd15684882187e0e83706cd88b873c.png" mode="">
				</image>
			</view>
			<view class="carp_1" @click="to2('/pages/my/collection/collection')">
				<view class="carp_1_1">
					<image src="http://puputong.huijipin.cn/uploads/20220322/a3251f43bbc975722d474445c5083164.png" />
					<text>我的收藏</text>
				</view>
				<image class="img"
					src="http://puputong.huijipin.cn/uploads/20220322/c3bd15684882187e0e83706cd88b873c.png" mode="">
				</image>
			</view>
			<view class="carp_1">
				<view class="carp_1_1">
					<image src="http://puputong.huijipin.cn/uploads/20220322/302428d300ba9c59a86f284493cfbf76.png" />
					<text>联系客服</text>
				</view>
				<image class="img"
					src="http://puputong.huijipin.cn/uploads/20220322/c3bd15684882187e0e83706cd88b873c.png" mode="">
				</image>
			</view>
		</view>



		<view class="carp">
			<view class="carp_1" @click="to2('/pages/my/privacy/privacy','隐私协议')">
				<view class="carp_1_1">
					<image src="http://puputong.huijipin.cn/uploads/20220322/8dcaec7e801f6dafbe6d0867c1765e70.png" />
					<text>隐私协议</text>
				</view>
				<image class="img"
					src="http://puputong.huijipin.cn/uploads/20220322/c3bd15684882187e0e83706cd88b873c.png" mode="">
				</image>
			</view>
			<view class="carp_1" @click="to2('/pages/my/systemSettings/systemSettings')">
				<view class="carp_1_1">
					<image src="http://puputong.huijipin.cn/uploads/20220322/ab8da7cb867eca5d9fec8ac5e55fb51a.png" />
					<text>系统设置</text>
				</view>
				<image class="img"
					src="http://puputong.huijipin.cn/uploads/20220322/c3bd15684882187e0e83706cd88b873c.png" mode="">
				</image>
			</view>
		</view>
		<!-- 发布遮罩 -->
		<fb-pop ref="children" />
		<u-tabbar @change="change" safeAreaInsetBottom v-model="current" :list="$list()" :mid-button="true" />
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: {}

			};
		},
		onShow() {
			this.api('Personal/userInfo').then(res => {
				this.info = res.data
			})
		},
		methods: {
			to2(a, b) {
				//跳转
				uni.navigateTo({
					url: `${a}?type=${b}`
				})
			},
			to(a, b) {
				//跳转
				uni.navigateTo({
					url: `/pages/${a}/${a}?type=${b}`
				})
			},
			//发布按钮
			change(index) {
				if (index == 2) {
					this.$refs.children.sign()
				}
			},
		}

	}
</script>

<style lang="scss">
	.content {
		background-color: #F4F5F7;
		box-sizing: border-box;
		// border: 1px solid black;
	}

	.carp {
		width: 91%;
		min-height: 100rpx;
		background: #FFFFFF;
		margin: 40rpx auto;
		border-radius: 16rpx;
		padding-left: 30rpx;
		box-sizing: border-box;
		padding-right: 30rpx;

		.carp_1 {
			display: flex;
			align-items: center;
			justify-content: space-between;

			.img {
				width: 12rpx;
				height: 20rpx;
			}

			.carp_1_1 {
				display: flex;
				align-items: center;
				line-height: 100rpx;

				text {
					font-size: 30rpx;
					font-family: OPPOSans;
					font-weight: 500;
					color: #333333;
					margin-left: 15rpx;
				}

				image {
					width: 30rpx;
					height: 30rpx;

				}
			}
		}

	}

	.top {
		padding-top: 160rpx;
		border: none;
		position: relative;
		height: 565rpx;
		box-sizing: border-box;
		background-size: 100% 100%;
		background-repeat: no-repeat;
		background-image: url(http://puputong.huijipin.cn/uploads/20220322/b24d91520b4f9947ce9981499494ad2e.png);

		.top4 {
			position: absolute;
			bottom: 30rpx;
			display: flex;
			align-items: center;
			width: 80%;
			justify-content: space-between;
			left: 50%;
			transform: translateX(-50%);

			.top4_1 {
				width: 40rpx;
				height: 36rpx;
			}

			.top4_2 {
				font-size: 28rpx;
				font-family: OPPOSans;
				font-weight: 500;
				color: #5D4026;
			}

			.top4_3 {
				display: flex;
				align-items: center;

				text {
					font-size: 24rpx;
					margin-right: 10rpx;
					font-family: OPPOSans;
					font-weight: 500;
					color: #6A4E31;
				}

				image {
					height: 34rpx;
					width: 34rpx;
				}
			}
		}

		.top3 {
			margin-top: 90rpx;
			display: flex;
			padding-left: 25rpx;
			padding-right: 25rpx;
			justify-content: space-around;

			.top3_1 {
				width: 35%;
				margin: 0;
				padding: 0;
				text-align: center;

				text:nth-of-type(1) {
					display: block;
					font-size: 32rpx;
					font-family: OPPOSans;
					font-weight: bold;
					color: #FFFFFF;
				}

				text:nth-of-type(2) {
					font-size: 20rpx;
					font-family: OPPOSans;
					font-weight: 400;
					color: #FFFFFF;
				}
			}
		}

		.top1 {
			display: flex;
			align-items: center;
			justify-content: space-between;
			// margin-top: 150rpx;
			padding-left: 30rpx;
			padding-right: 30rpx;
		}

		.top_2 {
			font-size: 26rpx;
			font-family: OPPOSans;
			font-weight: 500;
			color: #FFFFFF;
		}

		.top_1 {
			display: flex;
			align-items: center;

			image {
				width: 100rpx;
				height: 100rpx;
				border-radius: 100%;
			}

			.top_1_1 {
				margin-left: 20rpx;

				text:nth-of-type(1) {
					display: block;
					font-size: 36rpx;
					font-family: OPPOSans;
					font-weight: bold;
					color: #FFFFFF;
				}

				text:nth-of-type(2) {
					font-size: 24rpx;
					font-family: OPPOSans;
					font-weight: 400;
					color: #FFFFFF;
				}
			}
		}
	}

	::v-deep .u-tabbar__content {
		padding-bottom: env(safe-area-inset-bottom);
	}
</style>
